import api from "./index";

export default {
	//登录
	getAliLogin: (data) => api.post("/aliLogin", data),
	//获取用户信息
	getUserInfo: (data) => api.get("/getInfo", data),
	//查询商品分类列表
	// getGoodsClass: data => request("/lease/category/list", "get", data),
	getGoodsClass: (data) => api.get("/lease/category/list", data),
	//获取轮播图列表
	// getBannerList: data => request("/lease/banner/list", "get", data),
	getBannerList: (data) => api.get("/lease/banner/list", data),
	//获取商品信息
	// getList: data => request("/lease/good/list", "get", data),
	getList: (data) => api.get("/lease/good/list", data),
	//查询首页标签商品
	// getTatList: data => request("/lease/tags/getHomePageTag", "get", data),
	getTatList: (data) => api.get("/lease/tags/getHomePageTag", data),
	//获取商品详情
	// getIdClass: (id) => request(`/lease/good/${id}`, "get"),
	getIdClass: (id) => api.get(`/lease/good/${id}`),
	getGoodsById: (data) => api.get(`/lease/good/list/`, data),
	// 商品详情-计算金额
	getPrice: (data) => api.get("/lease/goodSku/getPriceByDay", data),
	//获取标签商品
	// getTagArray: data => request('/lease/tags/list', "get", data),
	getTagArray: (data) => api.get("/lease/tags/list", data),
	//获取收藏商品列表
	// getTagArray: data => request('/lease/tags/list', "get", data),
	getCollectionList: (data) => api.get("/lease/collection/list", data),
	//新增商品收藏
	// setCollection: data => request("/lease/collection", "post", data),
	setCollection: (data) => api.post("/lease/collection", data),
	//查看是否收藏
	// getCollectionId: (id) => request(`/lease/collection/${id}`, "get"),
	getCollectionId: (id) => api.get(`/lease/collection/${id}`),
	//删除收藏
	// deleteCollectin: (ids) => request(`/lease/collection/${ids}`, "DELETE"),
	deleteCollectin: (ids) =>
		api.delete(`/lease/collection/removeByproductIds/${ids}`),
	// //新增订单信息
	setOrder: (data) => api.post("/lease/order", data),
	
	// setOrder: (data) => api.post("/lease/order", data),
	//查看订单信息
	upOrder: (data) => api.put("/lease/order", data),
	// getOrderList: data => request("/lease/order/list", "get", data)
	getOrderList: (data) => api.get("/lease/order/list", data),
	//支付
	setPay: (id) => api.get(`/lease/order/pay/${id}`), 
	pay:(id)=>api.get(`/lease/order/freeDetain/${id}`),
	// setPay: (id) => api.get(`/lease/order/freeDetain/${id}`),

	//查询逾期订单列表
	getoverdue: (data) => api.get("/lease/overdue/list", data),

	//删除地址
	deleteAddressIds: (ids) => api.delete(`/lease/useraddr/${ids}`),


	//获取标签商品列表
	getTagsList: () => api.get('/lease/tags/getHomePageTag'),
	getTagGoodList: (name) => api.get("/lease/tags/list", name),
	//身份认证
	addRz: data => api.put("/system/user/profile", data),

	getFreeDetain: (orderNumber) => api.get(`/lease/order/freeDetain/${orderNumber}`),
};